11. 修正数据类型第 3 部分

修正数据类型第 3 部分

在最后一部分,你将修正 mpg 和温室气体得分列的数据类型。

完成这些最终修正后,请检查两个数据集中所有特征的数据类型,以确认我们之前指定的所有更改成功实施。这里再次提供它们以供参考:

修正 cyl 数据类型

  • 2008: 从字符串中提取整型。
  • 2018: 将浮点型转换为整型。

修正 air_pollution_score 数据类型

  • 2008: 将字符串转换为浮点型。
  • 2018: 将整型转换为浮点型。

修正 city_mpg hwy_mpg cmb_mpg 数据类型

  • 2008 and 2018: 将字符串转换为浮点型。

修正 greenhouse_gas_score 数据类型

  • 2008: 将浮点型转换为整型。

Workspace

This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.

Workspace Information:

  • Default file path:
  • Workspace type: jupyter
  • Opened files (when workspace is loaded): n/a

Task Description:

确认 BOTH 数据集的以下数据类型!

Task List:

Task Feedback:

棒极了!